import { Fragment, useState } from "react";

const ConstComp = () =>{
  console.log("abc")
  return ("hello")
}
const CountLable =({count}) =>{
  const color = count > 5? "red": "yellow";
  return <span style={{color}}>{count}</span>
}
export default function Counter(){
  const [count,setCount] = useState(0)
  return (
    <Fragment>
      <button onClick={()=>setCount(count +1)}>
        <CountLable count={count}></CountLable>
        <ConstComp></ConstComp>
      </button>
    </Fragment>
  )
}